<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\controller;

use cmf\controller\HomeBaseController;

class MainController extends HomeBaseController
{
    public function index()
    {
    	$slide=db('slide_item')->where(['status'=>1])->limit('0,5')->select()->toArray();
    	$this->assign('slide',$slide);
    	
    	
    	$product=db('product')->where(['status'=>1])->order('list_order desc,id desc')->limit('0,8')->select()->toArray();
    	$this->assign('product',$product);
    	
    	$need=db('need')->where(['status'=>1])->order('list_order desc,id desc')->limit('0,4')->select()->toArray();
    	$this->assign('need',$need);
    	//p($slide);
        return $this->fetch();
    }
}
